﻿using HQHS.Library.Common.Threading;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HQHS.Library.Common.Caching
{
    public abstract class CacheManagerBase<TKey, TValue>
    {
        public abstract void Refresh(ref CachedItemInfo<TKey, TValue> element, LoadItemDelegate loadMethod, KeyedReaderWriterLockSlim<TKey> loadLock);
        public abstract void RefreshAll();

        public delegate TValue LoadItemDelegate(TKey key);
    }
}
